//
// Created by 28735 on 2024/11/29.
//

#ifndef LINKQUEUE_H
#define LINKQUEUE_H

#include <cstdlib>

/*  队列的链表实现*/

typedef struct Node
{
    int data;
    Node * next;
}*NodePtr;


typedef struct LinkQueue
{
    int length;
    NodePtr front;
    NodePtr rear;
}*LinkQueuePtr;


inline void initialize(LinkQueuePtr &link_queue)
{
    link_queue->front = static_cast<NodePtr>(malloc(sizeof(Node)));
    link_queue->rear = link_queue->front;
    link_queue->length =0;
}


#endif //LINKQUEUE_H
